#ifndef H_BIGINTEGERPTR
#define H_BIGINTEGERPTR

#include "bigInteger.h"
#include "bigIntegerPtrCounter.h"

struct BigIntegerPtr
{
public:
	explicit BigIntegerPtr(BigInteger * pointer = 0);	
	BigIntegerPtr (BigIntegerPtr const& pointer);
	~BigIntegerPtr();

	BigInteger & operator *() const;
	BigInteger * operator ->() const;
	BigIntegerPtr & operator = (BigInteger * pointer);
	BigIntegerPtr & operator = (BigIntegerPtr const& pointer);
	void swap(BigIntegerPtr & b);

	friend bool operator ==(BigIntegerPtr const& a, BigIntegerPtr const& b);
	friend bool operator !=(BigIntegerPtr const& a, BigIntegerPtr const& b);
	friend bool operator >(BigIntegerPtr const& a, BigIntegerPtr const& b);
	friend bool operator <(BigIntegerPtr const& a, BigIntegerPtr const& b);

	friend bool operator ==(BigIntegerPtr const& a, BigInteger const* b);
	friend bool operator !=(BigIntegerPtr const& a, BigInteger const* b);
	friend bool operator >(BigIntegerPtr const& a, BigInteger const* b);
	friend bool operator <(BigIntegerPtr const& a, BigInteger const* b);		

private:
	BigIntegerPtrCounter * ptrCounter;	
};

#endif
